Arithmetic circuit

ABSTRACT

There is provided an arithmetic circuit for minimizing the delay of data path from the input of data to be operated to the output of the result of operation of data. To that end, the arithmetic circuit comprises a first selector to which one input data and a fixed data are inputted wherein these data are selectively outputted in response to a control signal, a second selector to which another input data and an output data of a register are inputted wherein these data are selectively outputted in response to the control signal, an adder for receiving an output signal of the first selector and an output signal of the second selector to execute the addition of the output signals of the first and second selectors, and a register for receiving an output signal of the adder to hold the output signal in synchronization with a clock signal.

FIELD OF THE INVENTION

[0001] The invention relates to an arithmetic unit in a semiconductor integrated circuit and a peripheral circuit thereof.

BACKGROUND OF THE INVENTION

[0002] For a configuration of an arithmetic unit of a semiconductor integrated circuit and a peripheral circuit thereof, there has been a conventional arithmetic circuit having a circuit configuration as shown in FIG. 1. According to this arithmetic circuit, one input data DA of an adder 72 is inputted to one input terminal of an AND gate 71 while the other input data DB of the adder 72 is inputted to one input terminal of an AND gate 70. A signal ENB representing that operation data is valid is inputted to the other input terminals of the AND gates 70 and 71, wherein when the signal ENB is logical “H” level (valid), the input data DA, DB pass through the AND gates 70, 71 and they are inputted to the adder 72 while when the input data DA, DB are logical “L” level (invalid), input signals SA, SB of the adder 72 are rendered “L” level to allow the adder 72 inoperative, thereby enhancing low consumption of the arithmetic circuit (see timing chart of FIG. 2).

[0003] However, according to the conventional arithmetic circuit, gate circuits such as AND circuits and so forth are provided at the pre-stage of the arithmetic unit, a delay of data path from the input of data to the holding of the data in a register 74 becomes large, arising a problem to make it difficult to operate at high speed.

SUMMARY OF THE INVENTION

[0004] It is an object of the invention to provide an arithmetic circuit capable of minimizing the delay of data path from the input of data to be operated and the output of the result of operation. Accordingly, there is provided an arithmetic circuit comprising a first selector to which one input data DA and a fixed data “0” are inputted wherein these data are selectively outputted in response to a control signal ENB, a second selector to which another input data DB and an output data of a register are inputted wherein these data are selectively outputted in response to the control signal ENB, an adder for receiving an output signal SA of the first selector and an output signal SB of the second selector to execute the operation of SA+SB, and a register for receiving an output signal SO of the adder to hold the output signal SO in synchronization with a clock signal. With such a circuit configuration, it is possible to configure the circuit capable of reducing the number of stage of gates of the data path from the input of data to the holding of the data in the register, which facilitates high speed operation and also enhances low consumption.

[0005] Another configuration of an arithmetic circuit of the invention comprises a first selector to which one input data DA and a fixed data “−1” are inputted wherein these data are selectively outputted in response to a control signal ENB, a second selector to which another input data DB and an output data of a register are inputted wherein these data are selectively outputted in response to the control signal ENB, an inverter circuit for receiving the control signal ENB and outputting an inverted signal thereof, an adder for receiving an output signal SA of the first selector and an output signal SB of the second selector at its addition input terminals, and an output signal of the inverter circuit at its carry input terminal CI to execute the operation of SA+SB+CI, and a register for receiving an output signal SO of the adder to hold the output signal SO in synchronization with a clock signal. With such a circuit configuration, it is possible to configure the circuit capable of reducing the number of stage of gates of the data path from the input of the data to the holding of the data in the register, which facilitates high speed operation and also enhances low consumption.

[0006] Still another configuration of an arithmetic circuit of the invention comprises a first latch circuit for receiving one input data DA to allow one input data DA to pass therethrough when a control signal ENB is valid while holding one input data DA when the control signal ENB is invalid, a second latch circuit for receiving another input data DB to allow another input data DB to pass therethrough when the control signal ENB is valid while holding another input data DB when the control signal ENB is invalid, an adder for receiving an output signal SA of the first latch circuit and an output signal SB of the second latch circuit to execute an operation of SA+SB, and a register for receiving an output signal SO of the adder and holding the output signal SO in synchronization with a clock signal. With such a circuit configuration, it is possible to configure the circuit capable of reducing the number of stage of gates of the data path from the input of data to the holding of the data in the register, which facilitates high speed operation, and also since the data to be inputted to the adder is not changed even if the input data is changed when the write enable signal ENB is invalid, the internal state of the adder is not change, thereby further enhancing low consumption.

BRIEF DESCRIPTION OF THE DRAWINGS

[0007]FIG. 1 is a circuit diagram showing a configuration of a conventional arithmetic circuit;

[0008] FIGS. 2 is a timing chart for explaining an operation of the conventional arithmetic circuit;

[0009]FIG. 3 is a circuit diagram showing a configuration of an arithmetic circuit according to a first embodiment of the invention;

[0010] FIGS. 4 is a timing chart for explaining an operation of the arithmetic circuit shown in FIG. 3;

[0011]FIG. 5 is a circuit diagram showing a configuration of an arithmetic circuit according to a second embodiment of the invention;

[0012] FIGS. 6 is a timing chart for explaining an operation of the arithmetic circuit shown in FIG. 5;

[0013]FIG. 7 is a circuit diagram showing a configuration of an arithmetic circuit according to a third embodiment of the invention; and

[0014]FIG. 8 is a timing chart for explaining an operation of the arithmetic circuit shown in FIG. 7.

PREFERRED EMBODIMENT OF THE INVENTION

[0015] Preferred embodiments of the invention are described in detail hereinafter with reference to the accompanying drawings. Assume that depicted by “H” level of a signal and “L” level of the same correspond to a logical “1” and a logical “0”.

First Embodiment

[0016]FIG. 3 is a circuit diagram showing a configuration of an arithmetic circuit according to the first embodiment of the invention. One input data DA and data “0” are inputted to a selector 11, and another input data DB and output data DO of a register 13 are inputted to a selector 10. A write enable signal ENB is inputted to the selectors 10, 11 as a selection signal thereof.

[0017] An output signal SA of the selector 11 and an output signal SB of the selector 10 are inputted to an adder 12 as data to be added, and the result of addition SO is outputted from the adder 12. The result of addition SO is inputted to the register 13, and it is fetched into the register 13 at the leading edge of a clock signal CLK.

[0018] An operation of the arithmetic circuit is now described in detail.

[0019] FIGS. 4 is a timing chart for explaining the operation of the arithmetic circuit shown in FIG. 3. Assume that, for brevity, before time T0, the data DA, DB and the register 13 are respectively initialized to a value “0” in response to a reset signal, not shown.

[0020] At time T0, although the data DA, DB become da0, db0, the selectors 10, 11 select “0, and the data DO which are respectively signals at the selection value “0” side since the write enable signal ENB remains “L” level, and since the output data DO is initialized to be “O” so that the expression SA=SB=“0” is established. Accordingly, the output SO of the adder 12 at this time becomes “0”.

[0021] At time T1, data DA, DB are changed to da1, db1, and the write enable signal ENB is changed to “H” level (valid). At this time, since the selectors 10, 11 select data DB, DA, the expressions SA=SA=da1, SB=DB=db1 are established, and the output SO of the adder 12 is expressed by SO=da1+db1.

[0022] At time T2, the register 13 latches the result of addition expressed by SO=da1+db1 at the leading edge of the clock signal CLK. Since the data DA, DB are changed to da2, db2 and the write enable signal ENB is changed to “L” level at time T2, the output signal SA of the selector 11 becomes a value “0” while the output signal SB of the selector 10 becomes the output data of the register 13 expressed by DO=da1+db1. Accordingly, the output SO of the adder 12 is expressed by SO=da1+db1, and it is not changed relative to the state thereof at time T1.

[0023] At time T3, since the value of the output signal SO of the adder 12 is expressed by SO=da1+db1 although the register 13 latches the output signal SO at the leading edge of the clock signal CLK, a value preceding this value is held. Since the write enable signal ENB remains “L” level although the data DA, DB are changed to da3, db3 at this time, the input signals SA, SB of the adder 12 and the output signal SO thereof are not changed in the same manner as the case at time T2.

[0024] At time T4, since the data DA, DB are changed to da4, db4 and the write enable signal ENB is changed to “H” level, the selector 11 selects the data DA and the selector 10 selects the data DB. As a result, the input signals SA, SB of the adder 12 are expressed by SA=da4 and SB=db4, and the output signal SO thereof is expressed by SO=da4+db4.

[0025] At time T5, the register 13 latches the result of operation expressed by SO=da4+db4 at the leading edge of the clock signal CLK. At this time, since the input data DA, DB are changed to da5, db5 and the write enable signal ENB is changed to “L” level, the selector 11 selects the value “0” and the selector 10 selects the output signal of the register 13 expressed by DO=da4+db4 and the expressions SA=“0” and SB=da4+db4 are established. Accordingly, the output signal of the adder 12 is expressed by SO=da4+db4.

[0026] In the first embodiment, it is possible to configure the circuit capable of reducing the number of stage of gates of the data path from the input of the data to the holding of the data in the register, which facilitates high speed operation and also enhances low consumption.

Second Embodiment

[0027]FIG. 5 is a circuit diagram showing a configuration of an arithmetic circuit according to the second embodiment of the invention. One input data DA and data “−1” are inputted to a selector 20, and another input data DB and an output data DO of a register 24 are inputted to a selector 21. A write enable signal ENB is inputted to the selectors 20, 21 as a selection signal thereof.

[0028] The write enable signal ENB is also inputted to an inverter circuit 23 and output signal thereof is inputted to a carry input terminal CI of an adder 22.

[0029] An output signal SA of the selector 20 and an output signal SB of the selector 21 are inputted to the adder 22 as its data input terminals and the result of addition SO is outputted from the adder 22. The result of addition SO is inputted to the register 24 and it is fetched into the register 24 at the leading edge of the clock signal CLK.

[0030] The carry input terminal CI is a terminal for inputting a carry at the 0 bit-th of the adder 22, and the adder 22 in the second embodiment executes an operation of SO=SA+SB+CI, and the result of operation is fetched into the register 24.

[0031] An operation of the arithmetic circuit according to the second embodiment is now described.

[0032] FIGS. 6 is a timing chart for explaining the operation of the arithmetic circuit shown in FIG. 5. Assume that, for brevity, before time T0, one input data DA, another input data DB and the register 24 are respectively initialized to a value “0” in response to a reset signal, not shown.

[0033] At time T0, although the data DA, DB become da0, db0, the selectors 20, 21 select “−1” and the data DO at the selection value “0” side since the write enable signal ENB remains “L” level, and the data DO is initialized to be “0” so that the expressions SA=“1” and SB=“0” are established. Meanwhile, the output of the inverter 23 is changed to “H” level, the adder 22 executes an operation expressed by SA+SB+CI=0−1+1. Accordingly, the output SO of the adder 22 at this time becomes “0”.

[0034] At time T1, the register 24 latches the result of operation expressed by SO=0 at the leading edge of the clock signal CLK. At this time, the input data DA, DB are changed to da1, db1 and the write enable signal ENB is changed to “H” level (valid). Since the selectors 20, 21 select the data DA, DB at this time, the expressions SA=DA=da1 and SB=DB=db1 are established and the carry inputted to the carry input terminal CI is expressed by CI=0, and hence the output SO of the adder 22 is expressed by SO=da1+db1.

[0035] At time T2, the register 24 latches the result of addition expressed by SO=da1+db1 at the leading edge of the clock signal CLK. Since the data DA, DB are changed to da2, db2 and the write enable signal ENB is changed to “L” level at time T2, the output signal SA of the selector 20 becomes a value “−1” while the output signal SB of the selector 21 becomes output data DO of the register 13 expressed by DO=da1+db1. Further, a logical value “1” corresponding to “H ” level is inputted to the carry input terminal CI. Accordingly, the adder 22 executes an operation of da1+db1−1+1 and the output SO thereof is expressed by SO=da1+db1.

[0036] At time T3, since the value of the output signal SO of the adder 22 is expressed by SO=da1+db1 although the output signal SO is latched at the leading edge of the clock signal CLK, the value of the register 24 is not changed. Since the write enable signal ENB remains “L” level although the data DA, DB are changed to da3, db3 at this time, the input signals SA, SB of the adder 12 and the output signal SO thereof are not changed in the same manner as the case at time T2, and the expression SO=da1+db1 is established.

[0037] At time T4, the output signal SO is latched at the leading edge of the clock signal CLK and the contents of the register 24 are not changed. Since the input data DA, DB are changed to da4, db4, and the write enable signal ENB is changed to “H” level at this time, the selector 20 selects the data DA and the selector 21 selects the data DB. Further, the carry inputted to the input carry input terminal CI becomes a logical value “0” corresponding to “L” level. As a result, the input signals of the adder 22 are expressed by SA=da4, SB=db4, and CI=0, and the output SO thereof is expressed by SO=da4+db4.

[0038] At time T5, the register 24 latches the result of operation expressed by SO=da4+db4 at the leading edge of the clock signal CLK. Since the input data DA, DB are changed to da5, db5 and the write enable signal ENB is changed to “L” level at this time, the selector 20 selects the value “−1” and the selector 21 selects the output signal DO of the register 24 expressed by DO=da4+db4 and the expressions SA=“−1” and SB=da4+db4 are established. Meanwhile, the logical value of the carry signal inputted to the carry input terminal CI becomes “1”. Accordingly, the adder 22 executes an addition of −1+da4+db4+1 and the output signal SO thereof is expressed by SO=da4+db4.

[0039] Even in the second embodiment, since the number of stage of gates of the data path from the input of the data to the holding of the data in the register can be reduced in the same manner as the first embodiment, high speed operation is facilitated and also low consumption can be enhanced.

Third Embodiment

[0040]FIG. 7 is a circuit diagram showing a configuration of an arithmetic circuit according to the third embodiment of the invention.

[0041] One input data DA is inputted to an input terminal I of a latch circuit 30, while a write enable signal ENB is inputted to an enable input terminal E thereof. Likewise, another input data DB is inputted to an input terminal I of a latch circuit 31, while the write enable signal ENB is inputted to an enable input terminal E thereof. Depicted by ENB is a write enable signal of a register 33, wherein data can be written when the write enable signal ENB is “H” level, and cannot be written (value is held) when the write enable signal ENB is “L” level. Since the write enable signal ENB is also inputted to the latch circuits 30, 31, and the latch circuits 30, 31 allow the input data to pass therethrough (0=1) when the write enable signal ENB is “H” level and latches the data when the write enable signal ENB is “L” level.

[0042] The output signals SA, SB from the latch circuits 30, 31 are inputted to the addition input terminals of an adder 32, and the result of addition of the output signals SA, SB is outputted from the adder 32 as an output signal SO, which is in turn inputted to the register 33.

[0043] An operation of the arithmetic circuit is now described in detail.

[0044]FIG. 8 is a timing chart for explaining the operation of the arithmetic circuit shown in FIG. 7. Assume that, for brevity, before time T0, the data DA, DB, the register 24 and the latch circuits 30, 31 are respectively initialized to a value “0” in response to a reset signal, not shown.

[0045] At time TO, since the write enable signal ENB remains “L” level although the data DA, DB are changed to da0, db0, the latch circuits 30, 31 output the initialized value “0” and the expression SA=SB=“0” is established. The output SO of the adder 32 at this time is expressed by SO=“0”.

[0046] At time T1, the register 33 latches the result of addition SO at the leading edge of the clock signal CLK. The input data DA, DB are changed to da1, db1 and the write enable signal ENB is changed to “H” level (valid). The latch circuits 30, 31 output the data DA, DB as they are at this time. Accordingly, the expressions SA=DA=da1 and SB=DB=db1 are established, and hence the output SO of the adder 32 is expressed by SO=da1+db1.

[0047] At time T2, the register 33 latches the result of addition SO expressed by SO=da1+db1 at the leading edge of the clock signal CLK Since the input data DA, DB are changed to da2, db2 and the write enable signal ENB is changed to “L” level at time T2, the outputs of the latch circuits 30, 31 maintain the latched data which are expressed by SA=da1, SB=db1. Since the input state of the adder is not changed even if the write enable signal ENB is changed to “L” level, the internal state of the adder is not changed, thereby reducing low consumption by that amount.

[0048] At time T3, although the register 33 latches the value of the output signal of the adder 32 at the leading edge of the clock signal CLK, this value is expressed by SO=da1+db1, and hence the value held by the register 33 is not changed. Since the write enable signal ENB remains “L” level although the input data DA, DB are changed to da3, db3 at this time, the input signals SA, SB and the output signal SO of the adder 12 are not changed, and hence the expression SO=da1+db1 is established in the same manner at time T2.

[0049] At time T4, the register 33 latches the output signal SO at the leading edge of the clock signal CLK, and the contents of the register 33 are not changed. Since the input data DA, DB are changed to da4, db4 and the write enable signal ENB is changed to “H” level at time T4, the latch circuits 30, 31 output outputs DA, DB expressed by DA=da4 and DB=db4. Since the inputs of the adder 32 are expressed by SA=da4 and SB=db4, the output thereof is expressed by SO=da4+db4.

[0050] At time T5, the register 33 latches the result of operation expressed by SO=da4+db4 at the leading edge of the clock signal CLK. Since the data DA, DB are changed to da5, db5 and the write enable signal ENB is changed to “L” level at this time, the output signal SA, SB of the latch circuits 30, 31 are not changed while maintaining the previous state. Accordingly, the input SO of the adder 32 is not changed, and it is expressed by SO=da4+db4.

[0051] Even in the third embodiment, the number of stage of gates of the data path from the input of the data to the holding of the data in the register can be reduced in the same manner as the first and second embodiments, high speed operation is facilitated and also in the third embodiment even if the data DA, DB are changed when the write enable signal ENB is changed to “L” level, the data to be inputted to the adder are not changed, and hence the internal state of the adder is not changed. Accordingly, low consumption can be more enhanced.

[0052] The invention is not limited to the first to third embodiments as set forth above, but it can be changed variously based on the gist of the invention. For example, in the first embodiment, if the input signal “0” to be inputted to the selector 11 is replaced by an input “1”, the adder 12 can be switched from a multiplier to a multiplier circuit. Further, in the third embodiment, if the adder 32 is replaced by a multiplier, a multiplier circuit can be formed by the circuit configuration thereof as it is. 

What is claimed is:
 1. An arithmetic circuit comprising: a first selector to which one input data and a fixed data are inputted wherein these data are selectively outputted in response to a control signal; a second selector to which another input data and an output data of a register are inputted wherein these data are selectively outputted in response to the control signal; an adder for receiving an output signal of the first selector and an output signal of the second selector to execute an addition of the output signals of the first and second selectors; and a register for receiving an output signal of the adder to hold the output signal in synchronization with a clock signal.
 2. An arithmetic circuit comprising: a first selector to which one input data and a fixed data are inputted wherein these data are selectively outputted in response to a control signal; a second selector to which another input data and an output data of a register are inputted wherein these data are selectively outputted in response to the control signal; an inverter circuit for receiving the control signal and outputting an inverted signal thereof; an adder for receiving an output signal of the first selector and an output signal of the second selector at its addition input terminals, and an output signal of the inverter circuit at its carry input terminal to execute an addition of the output signals of the first and second selectors and the output signal of the inverter circuit; and a register for receiving an output signal of the adder to hold the output signal in synchronization with a clock signal.
 3. An arithmetic circuit comprising: a first latch circuit for receiving one input data to allow one input data to pass therethrough when a control signal is valid while holding one input data when the control signal is invalid; a second latch circuit for receiving another input data to allow another input data to pass therethrough when the control signal is valid while holding another input data when the control signal is invalid; an adder for receiving an output signal of the first latch circuit and an output signal of the second latch circuit to execute an addition of the output signals of the first and second latch circuits; and a register for receiving an output signal of the adder and holding the output signal in synchronization with a clock signal. 